<?php
namespace app\backstage\validate;
use think\Validate;

class AdvertUser extends Validate
{
    protected $rule = [
        'channel_id'            => 'require|gt:0',
        'advert_account'        => 'require',
        'id'                    => 'require|gt:0',
    ];

    protected $message  =   [
        'id.require'                    => '信息记录ID不能为空',
        'id.gt'                         => '信息记录ID不能为空',
        'channel_id.require'            => '请选择关联投放号',
        'channel_id.gt'                 => '请选择关联投放号',
        'advert_account.require'        => '广告账号ID不能为空',
    ];

    protected $scene = [
        'add'       => ['channel_id','advert_account'],
        'edit'      => ['id','channel_id','advert_account'],
        'info'      => ['id']
    ];
}